<template>
  <div class="my_table">
    <el-table
      ref="singleTable"
      :data="list"
      highlight-current-row
      style="width: 100%"
      @current-change="handleCurrentChange"
    >
      <el-table-column
        type="index"
        label="序号"
        width="50"
      />
      <el-table-column
        property="taskCode"
        label="工单编号"
        width="120"
      />
      <el-table-column
        property="innerCode"
        label="设备编号"
        width="120"
      />
      <el-table-column
        property="taskType.typeName"
        label="工单类型"
      />
      <el-table-column
        property="createType"
        label="工单方式"
      >{{ createType?'手动':'自动' }}</el-table-column>

      <el-table-column
        property="taskStatusTypeEntity.statusName"
        label="工单状态"
      />
      <el-table-column
        property="userName"
        label="运维人员"
      />
      <el-table-column
        property="createTime"
        label="创建日期"
      />
      <el-table-column
        label="操作"
      >查看详情</el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  name: 'Mytable',
  props: {
    list: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {
      currentRow: null
    }
  },

  methods: {
    handleCurrentChange(val) {
      this.currentRow = val
    }
  }
}
</script>
<style lang="scss" scoped>
.my_table {
  ::v-deep .el-table th{
    line-height: 1.15;
    padding: 10px 0px 9px;
    background: rgb(243, 246, 251);
    font-weight: 500;
    text-align: left;
    color: rgb(102, 102, 102);
  }
}
</style>
